<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<div class="summary_add">
    <p>&nbsp&nbsp&nbsp&nbsp添加个人总结</p>
    <table>
        <tr>
            <td colspan="2">
                <div class="layui-form-item layui-form-text">
                    <label class="layui-form-label">个人总结</label>
                    <div class="layui-input-block">
                        <textarea name="desc" id="summary" placeholder="请输入内容"
                                  class="layui-textarea">${resume.resume.summary}</textarea>
                    </div>
                </div>
            </td>
        </tr>
    </table>
    <button class="button_save" id="button_sum_save">保存并更新</button>
    <button class="button_cancel" id="button_sum_cancel">取消</button>
</div>
<script>
    $("#button_sum_save").click(function () {
        let resumeId = $("#resumeId").val();
        let summary = $("#summary").val();
        let param = "id=" + resumeId + "&summary=" + summary;
        $.post('/hire/resume/summary/update', param, function (res) {
            if (res.code == '200') {
                $("#sum_info").load("/hire/resume/summary_info", {id: resumeId});
                $("#sum_edit").hide();
                $("#sum_info").show();
            } else {
                layer.msg(res.msg);
            }
        })
    })

    $("#button_sum_cancel").click(function () {
        let resumeId = $("#resumeId").val();
        // console.log($("#sum_info"))
        $("#sum_info").load("/hire/resume/summary_info", {id: resumeId});
        $("#sum_edit").hide();
        $("#sum_info").show();
    })
</script>
